<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>处理投诉</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="resources/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="resources/css/public.css" media="all" />
</head>
<body class="childrenBody">
<form class="layui-form" style="width:100%;" id="dataFrm">
    <div class="layui-form-item layui-row layui-col-xs12" >
        <label class="layui-form-label">用户联系电话:</label>
        <div class="layui-input-block ">
            <input type="text" class="layui-input perUserTel" name="perUserTel" lay-verify="required"  style="width: 200px" >
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">是否已经电话联系用户:</label>
        <div class="layui-input-block">
            <input type="checkbox" lay-skin="switch" name="status"   lay-text="YES|NO" >
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">请输入处理结果：:</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input perFeedbackResult" name="perFeedbackResult" lay-verify="required"  style="width: 500px">
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12">
        <div class="layui-input-block">
            <input type="hidden" id="serviceIdHiden"></input>
            <button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="addResult">提交处理结果</button>
        </div>
    </div>
</form>
<script type="text/javascript" src="resources/layui/layui.js"></script>
<script th:inline="none">
    layui.use(['form','layer','laydate','table','laytpl','upload'],function() {
        var form = layui.form
        layer = parent.layer === undefined ? layui.layer : top.layer,
            $ = layui.jquery,
            laydate = layui.laydate,
            laytpl = layui.laytpl,
            table = layui.table,
            upload=layui.upload;

        form.on("submit(addResult)",function (data) {
            var index = layer.msg('数据提交中，请稍候', {icon: 16, time: false, shade: 0.4});
            var perFeedbackId=$('#serviceIdHiden').val();
            var perFeedbackResult=$('.perFeedbackResult').val();
            var perFeedbackStatus="已处理";
            $.ajax({
                url: 'updateResultAndStatus.do',
                data: {perFeedbackId:perFeedbackId,perFeedbackResult:perFeedbackResult,perFeedbackStatus:perFeedbackStatus},
                type: 'POST',
                dataType: 'json',
                success: function (res) {
                    if (res.code == 200) {
                            layer.close(index);
                            layer.msg(res.msg);
                            //刷新父页面
                            parent.location.reload();

                        }
                }
            })
            return false;

        })

    });

</script>
</body>
</html>